/*
using MyGeneration/Template/NHibernate (c) by Sharp 1.4
based on OHM (alvy77@hotmail.com)
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace Model
{

	[Serializable]
	public class PageAccess 
	{
		#region Member Variables

		protected string _id;
		protected string _accessid;
		protected string _pageurl;
		protected string _pagename;
		protected string _parentid;
        protected DateTime? _createdate;
		protected string _remark;
		protected bool _bIsDeleted;
		protected bool _bIsChanged;
		#endregion
		
		
		#region Public Properties
		
		public virtual string Id
		{
			get { return _id; }
			set 
			{
			  if (value != null && value.Length > 36)
			    throw new ArgumentOutOfRangeException("Id", "Id value, cannot contain more than 36 characters");
			  _bIsChanged |= (_id != value); 
			  _id = value; 
			}
			
		}
		
		public virtual string AccessId
		{
			get { return _accessid; }
			set 
			{
			  if (value != null && value.Length > 36)
			    throw new ArgumentOutOfRangeException("AccessId", "AccessId value, cannot contain more than 36 characters");
			  _bIsChanged |= (_accessid != value); 
			  _accessid = value; 
			}
			
		}
		
		public virtual string PageUrl
		{
			get { return _pageurl; }
			set 
			{
			  if (value != null && value.Length > 100)
			    throw new ArgumentOutOfRangeException("PageUrl", "PageUrl value, cannot contain more than 100 characters");
			  _bIsChanged |= (_pageurl != value); 
			  _pageurl = value; 
			}
			
		}
		
		public virtual string PageName
		{
			get { return _pagename; }
			set 
			{
			  if (value != null && value.Length > 50)
			    throw new ArgumentOutOfRangeException("PageName", "PageName value, cannot contain more than 50 characters");
			  _bIsChanged |= (_pagename != value); 
			  _pagename = value; 
			}
			
		}
		
		public virtual string ParentId
		{
			get { return _parentid; }
			set 
			{
			  if (value != null && value.Length > 36)
			    throw new ArgumentOutOfRangeException("ParentId", "ParentId value, cannot contain more than 36 characters");
			  _bIsChanged |= (_parentid != value); 
			  _parentid = value; 
			}
			
		}

        public virtual DateTime? CreateDate
		{
			get { return _createdate; }
			set { _bIsChanged |= (_createdate != value); _createdate = value; }
			
		}
		
		public virtual string Remark
		{
			get { return _remark; }
			set 
			{
			  if (value != null && value.Length > 400)
			    throw new ArgumentOutOfRangeException("Remark", "Remark value, cannot contain more than 400 characters");
			  _bIsChanged |= (_remark != value); 
			  _remark = value; 
			}
			
		}
		

		public virtual bool IsDeleted
		{
			get
			{
				return _bIsDeleted;
			}
			set
			{
				_bIsDeleted = value;
			}
		}

        public virtual bool IsChanged
		{
			get
			{
				return _bIsChanged;
			}
			set
			{
				_bIsChanged = value;
			}
		}
		
		#endregion 
		
	}
	
}
